package com.team11.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author mahongtao
 * @since 2021-06-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("l_information")
@ApiModel(value="LInformation对象", description="")
public class LInformation implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "请假表id")
    @TableId(value = "l_id", type = IdType.AUTO)
    private Integer lId;

    @ApiModelProperty(value = "学号")
    @TableField("sid")
    private Integer sid;

    @ApiModelProperty(value = "申请提交日期")
    @TableField("l_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private LocalDateTime lDate;

    @ApiModelProperty(value = "主题")
    @TableField("l_theme")
    private String lTheme;

    @ApiModelProperty(value = "请假开始时间")
    @TableField("l_begin")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private LocalDateTime lBegin;

    @ApiModelProperty(value = "请假结束时间")
    @TableField("l_end")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private LocalDateTime lEnd;

    @ApiModelProperty(value = "请假原因")
    @TableField("l_reason")
    private String lReason;

    @ApiModelProperty(value = "请假具体原因")
    @TableField("l_jt_reason")
    private String lJtReason;

    @ApiModelProperty(value = "相关附件")
    @TableField("l_file")
    private Integer lFile;

    @ApiModelProperty(value = "审批状态")
    @TableField("l_status")
    private Integer lStatus;

    @ApiModelProperty(value = "审核没通过的原因")
    @TableField("l_fail_reason")
    private String lFailReason;

    @ApiModelProperty(value = "班级表")
    @TableField(exist = false)
    private CInformation cInformation;

    @ApiModelProperty(value = "学生表")
    @TableField(exist = false)
    private SInformation sInformation;

    @ApiModelProperty(value = "小组表")
    @TableField(exist = false)
    private  PInformation pInformation;

    @ApiModelProperty(value = "请假记录表")
    @TableField(exist = false)
    private LRecord lRecord;

    @ApiModelProperty(value = "老师表")
    @TableField(exist = false)
    private TInformation tInformation;

    @ApiModelProperty(value = "附件表")
    @TableField(exist = false)
    private CFiles cFiles;


}
